package cn.lanqiao.demo.service;

import cn.lanqiao.demo.entity.Leave;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/*
* 学生请假service层
* */
public interface LeaveService {
    /*学生添加请假条方法*/
    public int addLeave(String Sname,String reason,String time,String place,String status,String Sno) throws Exception;

    /*学生请假条信息展示*/
    public List<Leave> showLeaveBySno(String Sno) throws Exception;


    /*学生修改自己的请假条信息*/
    public int updateLeaveBySno(String reason,String time,String place,String Sno) throws Exception;

    /*学生删除通过Lno（请假条编号）删除假条*/
    public int delete(int Lno) throws Exception;

    /*所有学生假条显示*/
    public List<Leave> showAll() throws Exception;

    /*查询所有 未批阅 的学生假条，status=0的*/
    public List<Leave> notCheck() throws Exception;

    /*老师不同意学生请假，status从0变成1*/
    public int unallowLeave(int Lno) throws Exception;

    /*老师同意学生请假，status从1变成2*/
    public int allowLeave(int Lno) throws Exception;
}
